import React, { useState, useEffect, memo } from 'react'

function Index() {
  const [count, setCount] = useState(0);
  
  useEffect(() => {
    const timer = setInterval(() => {
      setCount(5);
    }, 1000);
    return () => clearInterval(timer);
  }, []);

  console.log(count)
  
  return <div>{count}</div>;
}

export default memo(Index)